package com.classic.duanzhi;

import android.app.Activity;
import android.content.Intent;
import android.support.v4.app.FragmentActivity;
import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
import android.widget.TextView;

import com.classic.content.contents;
import com.jaeger.library.StatusBarUtil;

public class PrivacyPolicyActivity extends FragmentActivity {

    public static void starActivity(Activity activity) {
        Intent intent = new Intent(activity, PrivacyPolicyActivity.class);
        activity.getWindow().setFlags(
                WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN
        );
        activity.startActivity(intent);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
//        overridePendingTransition(R.anim.out, 0);
        //无title
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_privacy_policy);
        StatusBarUtil.setColor(this,getResources().getColor(contents.TITLE_BACKGROUND),25);
        View view = findViewById(R.id.ll_title_layout);
        TextView v = findViewById(R.id.u_tv_content);
        TextView appname = findViewById(R.id.tv_title_appname);
        appname.setText("人信息保护政策");
        appname.setTextColor(getResources().getColor(contents.titleColor));

        view.setBackgroundColor(getResources().getColor(contents.TITLE_BACKGROUND));
        TextView viewById = findViewById(R.id.iv_title_back);
        viewById.setCompoundDrawablesWithIntrinsicBounds(getResources().getDrawable(contents.IC_BACK),null,null,null);
        viewById.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        v.setText(getResources().getString(R.string.u_regulation).replace("XXX（APP名称）",contents.APPNAME));
    }
}
